package com.example.cookweather.util;

import android.util.Log;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import java.util.HashMap;

public class JsonUtil {

    public static Map<String,String> JsonStrToObject(String jsonStr){
        JSONObject jsonObject = JSONObject.parseObject(jsonStr);
        Map<String,String> MapS =new HashMap<String, String>();;
        for (Map.Entry entry : jsonObject.entrySet()) {
            String key = entry.getKey().toString();
            String value = entry.getValue().toString();


            MapS.put(key,value);

        }
        return MapS;


    }
}


